package com.fpt.quanlyhethongsan.utils;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class JDBCClose {

	public static void close(Connection con, Statement sta, ResultSet rs, PreparedStatement prst) {
		try {
			if (rs != null)
				rs.close();
			if (sta != null)
				sta.close();
			if (con != null)
				con.close();
			if (prst != null)
				prst.close();
		} catch (SQLException e) {
			e.printStackTrace();
		}
	}
}
